<?php
declare (strict_types=1);


namespace app\common\validate;


class Admin extends  NpValidate
{
    protected $field = [
        'username' => '用户名',
    ];

    public function sceneEdit()
    {
        return $this
            ->append('username', [
                'require',
                'length' => '5,16'
            ])
            ->append('mobile', [
                'require',
                'mobile'
            ]);
    }

    public function sceneAdd()
    {
        return $this
            ->append('username', [
                'require',
                'length' => '5,16'
            ])
            ->append('mobile', [
                'require',
                'mobile'
            ]);
    }

}